﻿<%@ Page Title="ProductDetail" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" 
CodeBehind="ProductDetail.aspx.cs" Inherits="Webbshop.ProductDetail" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>


<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    
    <asp:DataList ID="productDetail" runat="server" OnItemCommand="Item_Command" 
        meta:resourcekey="productDetailResource1" >
        <ItemTemplate>
            <h1><%# Eval("name") %></h1>
            <div id="currentProduct">
                <img
                    id="image_<%# Eval("productId") %>"
                    src="Content/<%# Eval("ImageURL") %>"
                    alt="<%# Eval("name") %>"
                />
                
                <h2 id="productPrice"><%# Eval("price") %> kr</h2>
                <h2 id="productDescription"><%# Eval("productDescription")%></h2>
                <asp:Button ID="btnBuy" runat="server" Text="Köp" 
                    CommandArgument='<%# Eval("productId") %>' meta:resourcekey="btnBuyResource1" />
            </div>
        </ItemTemplate>
    </asp:DataList>

</asp:Content>